// run: $exec < input
// opt: 0
// flag: -g
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <set>

template <class T>
T abs(T x) { return x < 0 ? -x : x; }

struct data { int x, y; };
bool operator<(data const& a, data const& b)
{
	return a.x < b.x || (a.x == b.x && a.y < b.y);
}

int const maxn = 50;
data da[maxn];
int n;

bool inrange(int x, int l, int r)
{
	if (l > r) std::swap(l, r);
	return (l <= x && x <= r);
}

bool inrect(int x, int y, int x1, int y1, int x2, int y2)
{
	return inrange(x, x1, x2) && inrange(y, y1, y2);
}

bool contain(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4)
{
	return (x1 < std::min(x3, x4) && std::max(x3, x4) < x2) &&
		(y1 < std::min(y3, y4) && std::max(y3, y4) < y2);
}

bool cross(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4, int opt = 0)
{
	if (inrect(x1, y1, x3, y3, x4, y4) || inrect(x1, y2, x3, y3, x4, y4) || inrect(x2, y1, x3, y3, x4, y4) || inrect(x2, y2, x3, y3, x4, y4))
		return true;
	if (!opt) return cross(x3, y3, x4, y4, x1, y1, x2, y2, 1);
	else return false;
}

int area(int p1, int p2, int p3, int p4)
{
	int ret = abs((da[p2].x - da[p1].x) * (da[p2].y - da[p1].y));
	ret += abs((da[p4].x - da[p3].x) * (da[p4].y - da[p3].y));
	return ret;
}

int main()
{
	std::ios::sync_with_stdio(false);
	while (std::cin >> n && n) {
		std::set<std::pair<int, int>> all;
		for (int i = 1; i <= n; i++) {
			std::cin >> da[i].x >> da[i].y;
			all.insert({da[i].x, da[i].y});
		}
		if (n < 8) {
			std::cout << "imp\n";
			continue;
		}
		std::sort(da + 1, da + 1 + n);
		int ans = 0;
		for (int i = 1; i <= n; i++) {
			for (int j = i + 1; j <= n; j++) {

				if (!all.count({da[i].x, da[j].y}) || !all.count({da[j].x, da[i].y}))
						continue;
				std::set<std::pair<int, int>> tmp;
				tmp.insert({da[i].x, da[i].y});
				tmp.insert({da[j].x, da[j].y});
				tmp.insert({da[i].x, da[j].y});
				tmp.insert({da[j].x, da[i].y});
				std::set<int> sx;
				std::set<int> sy;
				for (int t = 1; t <= n; t++) {
					if (tmp.count({da[t].x, da[t].y})) continue;
					sx.insert(da[t].x);
					sy.insert(da[t].y);
				}
				if (sx.size() < 2 || sy.size() < 2)
					continue;
				int x1 = *sx.begin(), x2 = *(std::next(sx.begin()));
				int y1 = *sy.begin(), y2 = *(std::next(sy.begin()));
				if (contain(da[i].x, da[i].y, da[j].x, da[j].y, x1, y1, x2, y2)) ans = std::max(ans, abs((da[i].x - da[j].x) * (da[i].y - da[j].y)));
				if (contain(x1, y1, x2, y2, da[i].x, da[i].y, da[j].x, da[j].y)) ans = std::max(ans, abs((x1 - x2) * (y1 - y2)));
				if (cross(da[i].x, da[i].y, da[j].x, da[j].y, x1, y1, x2, y2)) continue;
				int ts = abs((da[i].x - da[j].x) * (da[i].y - da[j].y));
				ts += abs((x1 - x2) * (y1 - y2));
				ans = std::max(ans, ts);
			}
		}
		if (!ans) std::cout << "imp\n";
		else std::cout << ans << "\n";
	}
}

